from django.contrib import admin
from django.urls import path
from service import jobs_companies_r_service
from service import colleges_service
from service import users_service
from service import education_logs_service
from service import students_service
from service import majors_service
from service import project_logs_service
from service import send_logs_service
from service import companies_service
from service import jobs_service
from myspark import recommend_jobs
"""
URL configuration for mysite project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from cmdb import views

urlpatterns = [
    # # path('admin/', admin.site.urls),
    # path(f'index/',views.index),
    # #####管理员模块#######
    # path(f'admin/',views.admin_index),
    ######球员模块########
    # path(f'players/page/',player_service.player_index),#分页查看功能
    # path(f'player_add/',player_service.player_add),#增加功能
    ######教练模块########
    # path(f'coachs/page/', coach_service.coach_index),  # 分页查看功能
    # path(f'coach_add/', coach_service.coach_add),  # 增加功能
    # ######俱乐部模块#######
    # path(f'club/', views.club_index),  # 分页查看功能
    # path(f'club_add/', views.club_add),  # 增加功能
    # ######球队模块#######
    # path(f'team/', views.team_index),  # 分页查看功能
    # path(f'team_add/', views.team_add),  # 增加功能

    # path('jobs_companies_r/page/', jobs_companies_r_service),
    # =================俱一乐colleges表路由=============
    path('colleges/page/', colleges_service.colleges_index),
    path('colleges_add/', colleges_service.colleges_add),
    path('get_collegesById/', colleges_service.get_collegeById),

    path('companies_add/', companies_service.companies_add),
    path('companies/page/', companies_service.companies_index),
    path('get_companiesById/', companies_service.get_companiesById),

    path('jobs_companies_r_add/', jobs_companies_r_service.jobs_companies_r_add),
    path('jobs_companies_r/page/', jobs_companies_r_service.jobs_companies_r_index),
    path('jobs_companies_inner/page/', jobs_companies_r_service.jobs_companies_inner),


    path('jobs/page/', jobs_service.jobs_index),
    path('jobs_add/', jobs_service.jobs_add),
    path(f'get_jobsById/', jobs_service.get_jobsById),

    path('users/page/', users_service.users_index),
    path('users_add/', users_service.users_add),

    path('education_logs/page/', education_logs_service.education_logs_index),
    path('education_logs_add/', education_logs_service.education_logs_add),

    ######学生模块 ########
    path(f'students/page/', students_service.students_index),  # 分页查看功能
    path(f'students_add/', students_service.students_add),  # 增加功能
    path(f'get_students_with_education_logs/page/', students_service.get_students_with_education_logs),  # 关联查询
    path(f'get_studentById/', students_service.get_studentById),  #

    ######专业模块 ########
    path('majors/page/', majors_service.majors_index),  # 分页查看功能
    path('majors_add/', majors_service.majors_add),  # 增加功能
    path('get_majorById/', majors_service.get_majorById),  # 增加功能

    path('project_logs/page/', project_logs_service.project_logs_index),  # 分页查看功能
    path('project_logs_add/', project_logs_service.project_logs_add),  # 添加功能

    path('send_logs/page/', send_logs_service.send_logs_index),
    path('send_logs_add/', send_logs_service.send_logs_add),

    path(f'recommend_jobs/', recommend_jobs.recommend),

]
